POST
/
1
/
dictionaries
/
{dictionaryName}
/
batch
// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));

// Call the API
var response = await client.BatchDictionaryEntriesAsync(
  Enum.Parse<DictionaryType>("Plurals"),
  new BatchDictionaryEntriesParams
  {
    ClearExistingDictionaryEntries = true,
    Requests = new List<BatchDictionaryEntriesRequest>
    {
      new BatchDictionaryEntriesRequest
      {
        Action = Enum.Parse<DictionaryAction>("AddEntry"),
        Body = new DictionaryEntry
        {
          ObjectID = "1",
          Language = Enum.Parse<SupportedLanguage>("En"),
          Word = "fancy",
          Words = new List<string> { "believe", "algolia" },
          Decomposition = new List<string> { "trust", "algolia" },
          State = Enum.Parse<DictionaryEntryState>("Enabled"),
        },
      },
    },
  }
);
// >LOG
{
  "taskID": 1514562690001,
  "updatedAt": "2023-07-04T12:49:15Z"
}

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

dictionaryName
enum<string>
required

Dictionary type in which to search.

Available options:
plurals,
stopwords,
compounds

Body

application/json

Request body for updating dictionary entries.

Response

200
application/json

OK

Response, taskID, and update timestamp.